package com.xbongbong.saas.domain.dao;

import com.xbongbong.saas.domain.entity.CustomerStatementSnapshotEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Mapper
@Repository
public interface CustomerStatementSnapshotDao {
    Integer insert(CustomerStatementSnapshotEntity entity);

    void insertBatch(List<CustomerStatementSnapshotEntity> list);

    CustomerStatementSnapshotEntity getByKey(@Param("key") Long key, @Param("corpid") String corpid );

    Integer update(CustomerStatementSnapshotEntity entity);

    /**
     * 批量更新
     * @param list
     * @param corpid
     * @return java.lang.Integer
     * @author zcp
     * @since v1.0
     * @version v1.0
     */
    Integer updateBatchAbnormal(@Param("list") List<CustomerStatementSnapshotEntity> list, @Param("corpid") String corpid);

    List<CustomerStatementSnapshotEntity> findEntities(@Param("param") Map<String, Object> param);

    Integer getEntitiesCount(@Param("param") Map<String, Object> param);

    Integer deleteBatch(@Param("list")List<Long> snapshotIds,@Param("corpid") String corpid);

    void physicalDeleteBatch(@Param("list")List<Long> snapshotIds, @Param("corpid")String corpid);
}